package com.wwg.entity;

import java.io.Serializable;

/**
 * 页面分页查询对象
 * @author lizhixiong
 *
 * 2018年1月15日
 */
public class PagingVo implements Serializable{

	private static final long serialVersionUID = 1058995180818819981L;
	
	private int pagingType;//是否分页查询, 0=false;1=true
	private int fuzzyQuery;//是否模糊查询类型， 0=false;1=true
	private int rows;//每页条数
	private int page;//第几页
	private int totalNum;//总条数
	private int totalPage;//总页数
	private int length;
	
	//从第几条开始查询
	public int getLimitStart() {
		int start = (this.page - 1) * this.rows;
		return start>=0?start:0;
	}

	public int getPagingType() {
		return pagingType;
	}

	public void setPagingType(int pagingType) {
		this.pagingType = pagingType;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getTotalNum() {
		return totalNum;
	}

	public void setTotalNum(int totalNum) {
		this.totalNum = totalNum;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getFuzzyQuery() {
		return fuzzyQuery;
	}

	public void setFuzzyQuery(int fuzzyQuery) {
		this.fuzzyQuery = fuzzyQuery;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	@Override
	public String toString() {
		return "PagingVo [pagingType=" + pagingType + ", fuzzyQuery=" + fuzzyQuery + ", rows=" + rows + ", page=" + page
				+ ", totalNum=" + totalNum + ", totalPage=" + totalPage + "]";
	}

	
}
